import Vue from 'vue'
import VueRouter from 'vue-router'
//import HelloWorld from '@/components/HelloWorld'
import VueLazyload from 'vue-lazyload'
import Hotspotlist from './../../../views/HotSpot'
import Hotspotinfo from './../../../views/HotSpot/Hotstopinfo'
import News from './../../../views/HotSpot/news.vue'
import Yugao from './../../../views/HotSpot/yugao.vue'
import Musice from './../../../views/HotSpot/music.vue'
import Newscontent from './../../../views/HotSpot/hotspotcontent'
import Hotvideo from './../../../views/HotSpot/Hotspotvideo'
import VideoPlayer from 'vue-video-player'
// require('@/../node_modules/video.js/dist/video-js.css')
require('./../../../../node_modules/video.js/dist/video-js.css')
// require('vue-video-player/src/custom-theme.css')
require('./../../../../node_modules/vue-video-player/src/custom-theme.css')
Vue.use(VideoPlayer)
Vue.use(VueLazyload, {
  loading: './../../../../public/hotspot/timg.gif', // 为图片加载前展示的默认图片路径
})
const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}
const routes = [
  {
    path: '/hotspot',
    component: Hotspotlist
  },
  {
    path: '/hotspot/:tap=1',
    redirect: '/hotspot'
  },
  {
    path: '/hotspot/tab=2',
    component: News
  },
  {
    path: '/hotspot/tab=3',
    component: Yugao
  },
  {
    path: '/hotspot/tab=4',
    component: Musice
  },
  {
    path: '/hotspot/news/:id',
    component: Newscontent
  },
  {
    path: '/hotspot/video/:id',
    component: Hotvideo
  }
]

export default routes